#!/bin/bash

files=`ls`

ECHO="echo -e"

for i in $files; do
    $ECHO "do with $i"

    name=${i%.*}
    $ECHO "name: --- $name"

    sed -i "/^file=/c \\file=/opt/logs/$name/$name.log" $i
done
